/**
 * 
 */
package com.fitso.model.util.common;

/**
 * @author fatjs
 * 
 */
public class DateUtils extends org.apache.commons.lang.time.DateUtils {
	/**
	 * <p>
	 * Determines if the provided year is a leap year
	 * </p>
	 * <p>
	 * <b>Warning: </b> this calculation is only accurate from the Greogorian
	 * epoch of 1582, before that the Julian calendar was used and did not have
	 * a concept of a leap year!
	 * </p>
	 * 
	 * @param year
	 */
	public static boolean isLeapYear(Integer year) {
		if (year != null) {
			return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
		}
		return false;
	}
}
